//
//  MyVipCardListModel.m
//  NeusoftHBSJSober
//
//  Created by Apple-21 on 15/11/9.
//  Copyright (c) 2015年 com.neusoftsober. All rights reserved.
//

#import "MyVipCardListModel.h"

@implementation MyVipCardListModel

@end
@implementation MyVipCardListHttpResult

- (id)getVIPCardListResultWithDictionaryJSON:(NSDictionary *)dict {
    
    
    if (dict) {
        MyVipCardListModel *model = [[MyVipCardListModel alloc]init];
        
        model.activityID = [((NSNumber *)dict[@"ActivityID"]) stringValue];
        model.clearCardCharge = [((NSNumber *)dict[@"ClearCardCharge"]) stringValue];
        model.createDate = (dict[@"CreateDate"] == [NSNull null]) ? @"" : dict[@"CreateDate"];
        model.hasReturnCash = [((NSNumber *)dict[@"HasReturnCash"]) stringValue];
        model.ID = [((NSNumber *)dict[@"ID"]) stringValue];
        model.isMyCard = [((NSNumber *)dict[@"IsMyCard"]) stringValue];
        model.isUse = [(dict[@"IsUse"]) stringValue];
        model.openCardCharge = [((NSNumber *)dict[@"OpenCardCharge"]) stringValue];
        model.pickUpCash = [((NSNumber *)dict[@"PickUpCash"]) stringValue];
        model.returnCash = [((NSNumber *)dict[@"ReturnCash"]) stringValue];
        model.returnPercent = [((NSNumber *)dict[@"ReturnPercent"]) stringValue];
        model.returnPercentString = (dict[@"ReturnPercentString"] == [NSNull null]) ? @"" : dict[@"ReturnPercentString"];
        model.salemanAddress = (dict[@"SalemanAddress"] == [NSNull null]) ? @"" : dict[@"SalemanAddress"];
        model.salemanName = (dict[@"SalemanName"] == [NSNull null]) ? @"" : dict[@"SalemanName"];
        model.salemanPhone = (dict[@"SalemanPhone"] == [NSNull null]) ? @"" : dict[@"SalemanPhone"];
        model.salemanUserID = [((NSNumber *)dict[@"SalemanUserID"]) stringValue];
        model.useCount = [((NSNumber *)dict[@"UseCount"]) stringValue];
        model.userID = [((NSNumber *)dict[@"UserID"]) stringValue];
        model.UserName = (dict[@"UserName"] == [NSNull null]) ? @"" : dict[@"UserName"];
        return model;
    }
    return nil;
}
- (id)getVIPCardListResultWithArrayJSON:(NSArray *)array {

    if (array) {
        NSMutableArray *data = [NSMutableArray array];
        
        for (NSDictionary *dict in array) {
            [data addObject:[self getVIPCardListResultWithDictionaryJSON:dict]];
        }
        return data;
    }
    return nil;
}

@end